|
ninab416 2.2.1
|
API for configuring and manipulating NINA-B416 Click driver. More...
Topics | |
| NINA-B416 Device Settings | |
| Settings for registers of NINA-B416 Click driver. | |
| NINA-B416 MikroBUS Map | |
| MikroBUS pin mapping of NINA-B416 Click driver. | |
Functions | |
| void | ninab416_cfg_setup (ninab416_cfg_t *cfg) |
| NINA-B416 configuration object setup function. | |
| err_t | ninab416_init (ninab416_t *ctx, ninab416_cfg_t *cfg) |
| NINA-B416 initialization function. | |
| err_t | ninab416_generic_write (ninab416_t *ctx, uint8_t *data_in, uint16_t len) |
| NINA-B416 data writing function. | |
| err_t | ninab416_generic_read (ninab416_t *ctx, uint8_t *data_out, uint16_t len) |
| NINA-B416 data reading function. | |
| void | ninab416_set_rst_pin (ninab416_t *ctx, uint8_t state) |
| NINA-B416 set RST pin function. | |
| void | ninab416_reset_device (ninab416_t *ctx) |
| NINA-B416 reset device function. | |
| void | ninab416_set_cts_pin (ninab416_t *ctx, uint8_t state) |
| NINA-B416 set CTS pin function. | |
| uint8_t | ninab416_get_rts_pin (ninab416_t *ctx) |
| NINA-B416 get RTS pin function. | |
| void | ninab416_set_dsr_pin (ninab416_t *ctx, uint8_t state) |
| NINA-B416 set DSR pin function. | |
| uint8_t | ninab416_get_dtr_pin (ninab416_t *ctx) |
| NINA-B416 get DTR pin function. | |
| void | ninab416_cmd_run (ninab416_t *ctx, uint8_t *cmd) |
| NINA-B416 cmd run function. | |
| void | ninab416_cmd_set (ninab416_t *ctx, uint8_t *cmd, uint8_t *value) |
| NINA-B416 cmd set function. | |
| void | ninab416_cmd_get (ninab416_t *ctx, uint8_t *cmd) |
| NINA-B416 cmd get function. | |
API for configuring and manipulating NINA-B416 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void ninab416_cfg_setup | ( | ninab416_cfg_t * | cfg | ) |
NINA-B416 configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See ninab416_cfg_t object definition for detailed explanation. |
| void ninab416_cmd_get | ( | ninab416_t * | ctx, |
| uint8_t * | cmd ) |
NINA-B416 cmd get function.
This function is used to get the value of a given command from the Click module.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see NINAB416_CMD_x definitions. |
| void ninab416_cmd_run | ( | ninab416_t * | ctx, |
| uint8_t * | cmd ) |
NINA-B416 cmd run function.
This function sends a specified command to the Click module.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see NINAB416_CMD_x definitions. |
| void ninab416_cmd_set | ( | ninab416_t * | ctx, |
| uint8_t * | cmd, | ||
| uint8_t * | value ) |
NINA-B416 cmd set function.
This function sets a value to a specified command of the Click module.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | cmd | : Command string, see NINAB416_CMD_x definitions. |
| [in] | value | : Value string. |
| err_t ninab416_generic_read | ( | ninab416_t * | ctx, |
| uint8_t * | data_out, | ||
| uint16_t | len ) |
NINA-B416 data reading function.
This function reads a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [out] | data_out | : Output read data. |
| [in] | len | : Number of bytes to be read. |
>0 - Number of data bytes read, <=0 - Error/Empty Ring buffer. See #err_t definition for detailed explanation. | err_t ninab416_generic_write | ( | ninab416_t * | ctx, |
| uint8_t * | data_in, | ||
| uint16_t | len ) |
NINA-B416 data writing function.
This function writes a desired number of data bytes by using UART serial interface.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | data_in | : Data buffer for sending. |
| [in] | len | : Number of bytes for sending. |
>=0 - Success, <0 - Error. See #err_t definition for detailed explanation. | uint8_t ninab416_get_dtr_pin | ( | ninab416_t * | ctx | ) |
NINA-B416 get DTR pin function.
This function returns the data terminal ready pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| uint8_t ninab416_get_rts_pin | ( | ninab416_t * | ctx | ) |
NINA-B416 get RTS pin function.
This function returns the ready to send pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| err_t ninab416_init | ( | ninab416_t * | ctx, |
| ninab416_cfg_t * | cfg ) |
NINA-B416 initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See ninab416_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | void ninab416_reset_device | ( | ninab416_t * | ctx | ) |
NINA-B416 reset device function.
This function resets the device by toggling the reset pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| void ninab416_set_cts_pin | ( | ninab416_t * | ctx, |
| uint8_t | state ) |
NINA-B416 set CTS pin function.
This function sets the clear to send pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void ninab416_set_dsr_pin | ( | ninab416_t * | ctx, |
| uint8_t | state ) |
NINA-B416 set DSR pin function.
This function sets the data set ready pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |
| void ninab416_set_rst_pin | ( | ninab416_t * | ctx, |
| uint8_t | state ) |
NINA-B416 set RST pin function.
This function sets the reset pin logic state.
| [in] | ctx | : Click context object. See ninab416_t object definition for detailed explanation. |
| [in] | state | : Pin logic state. |